import { createStore, combineReducers, applyMiddleware } from 'redux';
import { currentheaderReducer } from './currentheader/currentheaderReducer';

import { recommendProductsReducer } from './recommendProducts/recommendProductsReducer';
import thunk from 'redux-thunk';

export const rootReducer = combineReducers({
  currentheaderReducer,
  recommendProductsReducer,
});

const store = createStore(rootReducer, applyMiddleware(thunk));

export type RootState = ReturnType<typeof store.getState>;

export default store;
